package zzz.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import zzz.mapper.ManagerMapper;
import zzz.model.Company;
import zzz.model.Manager;
import zzz.model.Order;
import zzz.service.ManagerService;

@Service
@Transactional
public class ManagerServiceImpl implements ManagerService{

	@Autowired
	private ManagerMapper mapper;
	
	@Override
	public Manager managerLogin(Manager manager) {
		// TODO Auto-generated method stub
		Manager loginManager=mapper.checkManager(manager);
		return loginManager;
	}

	@Override
	public List<Order> getOrderList() {
		// TODO Auto-generated method stub
		return mapper.getOrderList();
	}

	

	@Override
	public void delOrder(String hoId) {
		// TODO Auto-generated method stub
		System.out.println("ecId:"+hoId);
		mapper.delOrder(hoId);
	}

	

	@Override
	public Order getOrderByHoid(String hoId) {
		// TODO Auto-generated method stub
		return mapper.getOrderByHoid(hoId);
	}

	@Override
	public void updateOrder(Order order) {
		// TODO Auto-generated method stub
		System.out.println("ManagerService:"+order);
		mapper.updateOrder(order);
	}

	@Override
	public int mgPublishNewOrder(Order order) {
		// TODO Auto-generated method stub
		return mapper.mgPublishNewOrder(order);
	}


}
